﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace Hands.Queue
{
    public abstract class Atomic<T>
    {
        protected T value;

        private const bool TRUE = true;

        public Atomic(T value)
        {
            this.value = value;
        }

        public T get()
        {
            return this.value;
        }

        public void set(T value)
        {
            this.value = value;
        }

        public abstract bool compareAndSet(T expect, T data);
    }
}
